from rest_framework.routers import DefaultRouter
from . import views
#实例化router对象
urlpatterns=[]
router=DefaultRouter()#会生成api+router


#注册视图视图集类
router.register("course",views.CartAPIView,"cart")
# print(router.urls)


#把路由器列表注册到django项目中
urlpatterns +=router.urls